<?php

//use yii\web\View;

use yii\helpers\Url;
use common\models\Word;

?>
<?php echo $this->render("/layouts/top")?>

<style>

.questiondiv{

	margin:0px auto; 
	margin-top:1px; 
	width:1000px; 

	line-height:28px; 
	background-color:#EEE;

}

.questiondiv span{

	
}

ul{margin:0;padding:0;list-style:none;}  


.rightnum{
	display:inline-block;
	padding:0px;
	width:50px; 
	height:28px; 
	font-size:18px;
	text-align:center;
}


</style>
<script type="text/javascript" src="/js/NoLimitCategory.js"></script>
<?php
	for($i=0; $i<count($topics); $i++){
?>

<div class="questiondiv"><!--
 --><span style="display:inline-block; width:50px; text-align:center"><?php echo $topics[$i]["id"]?></span>  <!--
 --><span style="display:inline-block; width:776px; color:<?php echo $questioncolor?>;">
  <?php echo $category?> <?php echo $topics[$i]['name']?>
  </span><!--
 --><span class="rightnum"><strong style="color:<?php echo $color?>;"><?php echo $correct_write?></strong></span>  <!--
 --><span style="display:inline-block; width:50px; text-align:center;"><?php echo $isfav?></span>  <!--
 --><span style="display:inline-block; width:50px; text-align:center;"><input type="button" value="详情" onclick='(function(){window.open("<?php echo Url::to(['/topic/detail', 'id'=>$topics[$i]["id"]])?>")})()' /></span>
</div>
<?php
	}
?>

<br>

<?php
	$pageurl = "?c1=$c1&c2=$c2&c3=$c3&cid=$cid&searchtext=$searchtext&transtext=$transtext&correct=$correct&tags=$tags&page=";
	
?>
<div style=" margin:0px auto; width:1000px; height:28px; line-height:28px; background-color:#EEE; text-align:center">
<span>总数据:<?php echo $pv->dataCount?>条</span>
<a href="<?php echo $pageurl."1"?>">首页</a>
<a href="<?php echo $pageurl.$pv->prevPage?>">上一页</a>
<span><?php echo $pv->currentPage."/".$pv->pageCount?></span>
<a href="<?php echo $pageurl.$pv->nextPage?>">下一页</a>
<a href="<?php echo $pageurl.$pv->pageCount?>">末页</a>
</div>

<script language="javascript">


function edit(wid){
	window.location.href = "<?php echo Url::to(['/word/edit'])?>"+"?id="+wid;
}

</script>
<br>
<?php echo $this->render("/layouts/footer")?>
